import { observable, action } from 'mobx';
import BaseStore  from "./BaseStore"

class CreateDynamicStore {
    create = function (initialValues) {
        class DynamicStore extends BaseStore {
            // 使用 observable 装饰器来创建动态字段
            @observable fields = observable(initialValues);

            // 更新字段值的方法
            @action updateField = (fieldName, value) => {
                this.fields[fieldName] = value;
            };

            // 其他可能的方法...
        }

        return new DynamicStore();
    }
}

export default new CreateDynamicStore()